<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html lang="en">
    <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>约键</title>
    <meta name="description" content="这是一个 index 页面">
    <meta name="keywords" content="index">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="renderer" content="webkit">
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <link rel="icon" type="image/png" href="/neu_yuejian201/Public/assets/i/favicon.png">
    <link rel="apple-touch-icon-precomposed" href="/neu_yuejian201/Public/assets/i/app-icon72x72@2x.png">
    <meta name="apple-mobile-web-app-title" content="Amaze UI" />
    <script src="/neu_yuejian201/Public/assets/js/echarts.min.js"></script>
    <link rel="stylesheet" href="/neu_yuejian201/Public/assets/css/amazeui.min.css" />
    <link rel="stylesheet" href="/neu_yuejian201/Public//neu_yuejian201/Public/assets/css/amazeui.datatables.min.css" />
    <link rel="stylesheet" href="/neu_yuejian201/Public/assets/css/app.css">
    <script src="/neu_yuejian201/Public/assets/js/jquery.min.js"></script>

</head>
    <script type="text/javascript">
    function imgPreview(fileDom){
        //判断是否支持FileReader
        if (window.FileReader) {
            var reader = new FileReader();
        } else {
            alert("您的设备不支持图片预览功能，如需该功能请升级您的设备！");
        }

        //获取文件
        var file = fileDom.files[0];
        var imageType = /^image\//;
        //是否是图片
        if (!imageType.test(file.type)) {
            alert("请选择图片！");
            return;
        }
        //读取完成
        reader.onload = function(e) {
            //获取图片dom
            var img = document.getElementById("preview");
            //图片路径设置为读取的图片
            img.src = e.target.result;
        };
        reader.readAsDataURL(file);
    }
</script>
<body data-type="widgets">
    <script src="/neu_yuejian201/Public/assets/js/theme.js"></script>
    <div class="am-g tpl-g">
        <!-- 头部 -->
            <header>
            <!-- logo -->
            <div class="am-fl tpl-header-logo">
                <a href="javascript:;"><img src="/neu_yuejian201/Public/assets/img/logo.png"></a>
            </div>
            <!-- 右侧容 -->
            <div class="tpl-header-fluid">
                <!-- 侧边切换 -->
                <div class="am-fl tpl-header-switch-button am-icon-list">
                    <span>

                </span>
                </div>
                <!-- 其它功能-->
                <div class="am-fr tpl-header-navbar">
                    <ul>
                        <!-- 欢迎语 -->
                        <li class="am-text-sm tpl-header-navbar-welcome">
                            <a href="javascript:;">欢迎你, <span>Amaze UI</span> </a>
                        </li>
                        <!-- 退出 -->
                        <li class="am-text-sm">
                            <a href="<?php echo U('Public/signout');?>">
                                <span class="am-icon-sign-out"></span> 退出
                            </a>
                        </li>
                    </ul>
                </div>
            </div>

        </header>
        <!-- 风格切换 -->
        <div class="tpl-skiner">
            <div class="tpl-skiner-toggle am-icon-cog">
            </div>
            <div class="tpl-skiner-content">
                <div class="tpl-skiner-content-title">
                    选择主题
                </div>
                <div class="tpl-skiner-content-bar">
                    <span class="skiner-color skiner-white" data-color="theme-white"></span>
                    <span class="skiner-color skiner-black" data-color="theme-black"></span>
                </div>
            </div>
        </div>
        
<div class="left-sidebar">
            <!-- 菜单 -->
            <ul class="sidebar-nav">
                <li class="sidebar-nav-link">
                    <a href="<?php echo U('Club/club/editclub');?>">
                        <i class="am-icon-home sidebar-nav-link-logo"></i> 管理俱乐部信息
                    </a>
                </li>
                <li class="sidebar-nav-link">
                    <a href="<?php echo U('Club/video/videolist');?>">
                        <i class="am-icon-table sidebar-nav-link-logo"></i> 管理视频
                    </a>
                </li>
                <li class="sidebar-nav-link">
                    <a href="<?php echo U('Club/coach/coachlist');?>">
                        <i class="am-icon-calendar sidebar-nav-link-logo"></i> 管理教练
                    </a>
                </li>
                <li class="sidebar-nav-link">
                    <a href="<?php echo U('Club/course/courselist');?>">
                        <i class="am-icon-wpforms sidebar-nav-link-logo"></i> 管理课程

                    </a>
                </li>
                <li class="sidebar-nav-link">
                    <a href="<?php echo U('Club/activity/activitylist');?>">
                        <i class="am-icon-bar-chart sidebar-nav-link-logo"></i> 管理活动

                    </a>
                </li>
                <li class="sidebar-nav-link">
                    <a href="<?php echo U('Club/train/trainlist');?>">
                        <i class="am-icon-bar-chart sidebar-nav-link-logo"></i> 管理培训

                    </a>
                </li>
            </ul>
        </div>
        <!-- 内容区域 -->
        <div class="tpl-content-wrapper">

            <div class="row-content am-cf">
                <div class="row">

                    <div class="am-u-sm-12 am-u-md-12 am-u-lg-12">
                        <div class="widget am-cf">
                            <div class="widget-head am-cf">
                                 <div class="widget-title am-fl"><h1 style="display:inline">修改培训</h1><a href="<?php echo U('Club/train/trainlist');?>">返回</a></div>
                            </div>
                            <div class="widget-body  widget-body-lg am-fr">
                                <form class="am-form am-form-horizontal" method='post' enctype="multipart/form-data" action="<?php echo U('Club/train/edit',array('trainid'=>$train['trainid']));?>">
                                  <div class="am-form-group">
                                    <label class="am-u-sm-3 am-form-label">培训名称:</label>
                                    <div class="am-u-sm-6 am-u-sm-centered">
                                      <input type="text" name="trainname" id="trainname" placeholder="请输入活动名" value="<?php echo ($train["trainname"]); ?>">
                                    </div>
                                  </div>

                                  <div class="am-form-group">
                                    <label class="am-u-sm-3 am-form-label">培训简介:</label>
                                    <div class="am-u-sm-6 am-u-sm-centered">
                                      <textarea rows="5" name="introduction" id="introduction"><?php echo ($train["introduction"]); ?></textarea>
                                    </div>
                                  </div>

                                  <div class="am-form-group">
                                    <label class="am-u-sm-3 am-form-label">上课须知:</label>
                                    <div class="am-u-sm-6 am-u-sm-centered">
                                      <input type="text" name="mustnow" id="mustnow" placeholder="请输入地址" value="<?php echo ($train["mustnow"]); ?>">
                                    </div>
                                  </div>

                                  <div class="am-form-group">
                                    <label class="am-u-sm-3 am-form-label">收费金额:</label>
                                    <div class="am-u-sm-6 am-u-sm-centered">
                                      <input type="text" name="price" id="price" placeholder="请输入收费金额" value="<?php echo ($train["price"]); ?>">
                                    </div>
                                  </div>

                                  <div class="am-form-group">
                                    <label class="am-u-sm-3 am-form-label">授课时间:</label>
                                    <div class="am-u-sm-6 am-u-sm-centered">
                                      <input type="text" name="time" id="time" placeholder="请输入时间" value="<?php echo ($train["time"]); ?>">
                                    </div>
                                  </div>
                                  <div class="am-form-group">
                                    <label class="am-u-sm-3 am-form-label">授课地址:</label>
                                    <div class="am-u-sm-6 am-u-sm-centered">
                                      <input type="text" name="address" id="address" placeholder="请输入电话号码" value="<?php echo ($train["address"]); ?>">
                                    </div>
                                  </div>

                                      <div class="am-form-group am-form-file">
                                          <label class="am-u-sm-3 am-form-label">活动图片:</label>
                                          <div class="am-u-sm-6 am-u-sm-centered">
                                            <img id="preview"  width="100" height="100" src="/neu_yuejian201/Public/photo/<?php echo ($train["pic"]); ?>" />
                                          </div>
                                          <div class="am-u-sm-6 am-u-sm-centered">
                                            <button type="button" class="am-btn am-btn-danger am-btn-sm">
                                              <i class="am-icon-cloud-upload"></i> 选择要上传的文件</button>
                                          </div>
                                          <input type="file" name="pic" id="pic" onchange="imgPreview(this)">
                                      </div>

                                  <div class="am-form-group">
                                    <div class="am-u-sm-6 am-u-sm-centered">
                                      <button  type="submit" class="am-btn am-btn-primary">修改</button>
                                      <button type="reset" class="am-btn am-btn-default">重置</button>
                                    </div>
                                  </div>
                                </form>
                            </div>
                        </div>
                    </div>
                </div>

            </div>
        </div>
    </div>
    </div>

        <script src="/neu_yuejian201/Public//neu_yuejian201/Public//neu_yuejian201/Public//neu_yuejian201/Public/assets/js/amazeui.min.js"></script>
    <script src="/neu_yuejian201/Public//neu_yuejian201/Public//neu_yuejian201/Public/assets/js/amazeui.datatables.min.js"></script>
    <script src="/neu_yuejian201/Public//neu_yuejian201/Public/assets/js/dataTables.responsive.min.js"></script>
    <script src="/neu_yuejian201/Public/assets/js/app.js"></script>
</body>

</html>